/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package plantrmiclient;

import com.plantplaces.dto.Plant;
import java.rmi.NotBoundException;
import java.rmi.RemoteException;
import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;
import plantcolorrmiserver.IPlantColor;

/**
 *
 * @author Brandan
 */
public class GetPlants {

    private static final String HOST = "localhost";
    private static final int PORT = 1099;
    private static Registry registry;
    
    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) throws RemoteException, NotBoundException {
        // TODO code application logic here
        registry = LocateRegistry.getRegistry(HOST, PORT);
        IPlantColor plantColor = (IPlantColor) registry.lookup("PlantColor");
        Plant myPlant = plantColor.getPlant(0,0,0);
        System.out.println("Genus: " + myPlant.getGenus() + myPlant.getSpecies());;
        
    }
}
